package com.itheima.service;

import com.itheima.domain.Student;
import com.itheima.mapper01.StudentMapper;
import com.itheima.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class Demo {

    @Test
    public void findAll (){
        SqlSession sqlSession = MybatisUtils.getSqlSession();
        StudentMapper mapper = sqlSession.getMapper(StudentMapper.class);

        List<Student> list = mapper.findAll();
        for (Student student : list) {
            System.out.println(student);

           //System.out.println(student.getName()+""+student.getAge());
        }
    }
}
